<head>
    <meta charset="UTF-8">
<title>算法训练 网络流裸题</title>
<link rel="stylesheet" href="../css/main.css">
</head>
 <div>问题描述：</div>
<div>一个有向图，求1到N的最大流</div>
<div>&nbsp;</div>
<div>输入格式：</div>
<div>第一行N M，表示点数与边数</div>
<div>接下来M行每行s t c表示一条从s到t的容量为c的边</div>
<div>&nbsp;</div>
<div>输出格式：</div>
<div>一个数最大流量</div>
<div>&nbsp;</div>
<div>样例输入：</div>
<div>6 10</div>
<div>1 2 4</div>
<div>1 3 8</div>
<div>2 3 4</div>
<div>2 4 4</div>
<div>2 5 1</div>
<div>3 4 2</div>
<div>3 5 2</div>
<div>4 6 7</div>
<div>5 4 6</div>
<div>5 6 3</div>
<div>&nbsp;</div>
<div>样例输出：</div>
<div>8</div>
<div>&nbsp;</div>
<div>数据约定：</div>
<div>n&lt;=1000 m&lt;=10000</div>
<div>&nbsp;</div>